const operationLogDao = require("@/dao/opertaion_log");
const z_base_Dao = require("@/dao/z_base");
const OperationModal = require("@/model/OperateionLog");
const { ErrorCode } = require("@/utils/r/code");

const operation_log = {
  async GetList(query) {
    const { pageData, total } = await operationLogDao.GetList(query);
    return {
      pageData,
      total,
      pageNum: +query.page_num,
      pageSize: +query.page_size,
    };
  },
  async Delete(ids) {
    await z_base_Dao.Delete(OperationModal.OperationLog, { id: ids });
    return ErrorCode.OK;
  },
};

module.exports = operation_log;
